package cn.schoolwow.workflow.test.module.oa.common.flow.node;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.workflow.domain.deploy.WorkFlowDeployFileContext;
import cn.schoolwow.workflow.domain.deploy.WorkFlowDeployNode;

public class ConvertAutomaticNodeCommonFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        WorkFlowDeployNode workFlowDeployNode = flowContext.checkInstanceData(WorkFlowDeployNode.class);
        WorkFlowDeployFileContext workFlowDeployFileContext = flowContext.checkInstanceData(WorkFlowDeployFileContext.class);

        workFlowDeployFileContext.nodes.add(workFlowDeployNode);
    }

    @Override
    public String name() {
        return "转换自动通过/拒绝节点公共流程";
    }
}
